import fetch from '@/utils/fetch'

export function getProList(query) {
  return fetch({
    url: '/api/product/list',
    method: 'post',
    data: query
  })
}

export function editProList(query) {
  return fetch({
    url: '/api/product/update',
    method: 'put',
    data: query
  })
}

export function delProList(id) {
  return fetch({
    url: `/api/product/delete/${id}`,
    method: 'delete'
  })
}

export function addProList(query) {
  return fetch({
    url: '/api/product',
    method: 'post',
    data: query
  })
}
